# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-autoar
pkgver=0.4.3
pkgrel=0
pkgdesc="GNOME archive extraction library"
options="chmod-clean" # There are read-only test files
url="https://www.gnome.org/"
arch="all"
license="LGP-2.1-only"
makedepends="meson gtk+3.0-dev libarchive-dev gobject-introspection-dev vala
	gtk-doc"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/gnome-autoar/${pkgver%.*}/gnome-autoar-$pkgver.tar.xz"

# secfixes:
#   0.3.1-r0:
#     - CVE-2021-28650
#     - CVE-2020-36241

build() {
	abuild-meson \
		-Dgtk=true \
		-Dintrospection=enabled \
		-Dvapi=true \
		-Dtests=true \
		-Dgtk_doc=true \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
9f1ba584c4fc8e82d842fb21d3a113d64faa85f8f27cb7afb5d09919f510e350608b6a4e2f3ac527162ab338d008271bd430fb5b8ead265098c1810ffcbcef30  gnome-autoar-0.4.3.tar.xz
"
